<?php
namespace RTSCraft\MainBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\UniqueConstraint;
use Doctrine\ORM\Mapping\OrderBy;

/**
 * @ORM\Entity
 * @ORM\Table(name="Costs")
 */
class Costs
{
  /**
   * @ORM\Id
   * @ORM\Column(type="integer")
   * @ORM\GeneratedValue(strategy="AUTO")
   */
  protected $id;

  /**
   * @ORM\Column(type="string")
   */
  protected $name;

  /*
   * @ORM\OneToOne(targetEntity="CostTypes")
   * @ORM\JoinColumn(name="type_id", referencedColumnName="id")
   */
  // TODO : implement this.
  //protected $costType;

  /**
   * @ORM\ManyToMany(targetEntity="Prices")
   **/
  protected $prices;
  /**
   * Get costType
   *
   * @return CostType
   */
  public function getCostType()
  {
    return $this->costType;
  }

  /**
   * Get id
   *
   * @return integer 
   */
  public function getId()
  {
    return $this->id;
  }
  /**
   * Get Prices
   *
   * @return Prices[]
   */
  public function getPrices()
  {
    return $this->prices;
  }

    public function __construct()
    {
        $this->prices = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Set costType
     *
     * @param RTSCraft\MainBundle\Entity\CostTypes $costType
     */
    public function setCostType(\RTSCraft\MainBundle\Entity\CostTypes $costType)
    {
        $this->costType = $costType;
    }

    /**
     * Add prices
     *
     * @param RTSCraft\MainBundle\Entity\Prices $prices
     */
    public function addPrices(\RTSCraft\MainBundle\Entity\Prices $prices)
    {
        $this->prices[] = $prices;
    }

    /**
     * Set name
     *
     * @param integer $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * Get name
     *
     * @return integer 
     */
    public function getName()
    {
        return $this->name;
    }
}